The attack happened at Downtown Crossing station around 11:30 a.m., according to the MBTA Transit Police.
Officers found the teen responsible for using the stun gun and arrested her, police said.
An officer noticed another teen in the group who was wanted for an unrelated robbery. She was also busted.
Their names were not released because of their age.
Police did not release any further details about why the group of teens tried to attack the man.
MBTA Transit Police are investigating.
Click here to follow Daily Voice Cambridge and receive free news updates.